<template>
  <div>
    <h3>孙子组件</h3>
    <p>收到💴:{{ money }}</p>
  </div>
</template>

<script>
import { inject } from 'vue'
export default {
  setup() {
    // 接收注入的数据
    // const 变量名  = inject('注入数据的名字')
    const money = inject('mky')
    const fn = inject('changeMoney')
    fn(0)
    return { money }
  },
}
</script>

<style></style>
